package org.example.oss.contorller;

import org.example.core.utils.R;
import org.example.oss.service.OssService;
import org.example.security.annotation.CountNumber;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@RestController
@RequestMapping("/oss/front")
public class OssFrontController {

    @Autowired
    private OssService ossService;

    // 获取上传凭证
    @GetMapping("/frontPolicy")
    @CountNumber
    public R<Map<String,String>> getPolicy(){
        Map<String,String> resMap = ossService.getFrontPolicy();
        return R.ok(resMap);
    }
}